package com.lingjtx.common.core.constant;

// 微信模板
public enum WeXinTemplate {
    DEFAULT(0, "1n7-akzd8fMz-Xq4A_srF1LsM5PC77hgv0x6-Zii9Dw", "新任务提醒"),

    VERIFICATION_CODE(1, "DQ1tZaN89Oqqubic-jEB7lH0YC82jmiVOdqjl758LTU", "输入动态校验码通知")
    ;

    private int code;

    private String id;

    private String title;

    public String getId() {
        return id;
    }

    public int getCode() {
        return code;
    }

    public String getTitle() {
        return title;
    }

    WeXinTemplate(int code, String id, String title) {
        this.code = code;
        this.id = id;
        this.title = title;
    }

    public static WeXinTemplate codeOf(int code) {
        for (WeXinTemplate value : WeXinTemplate.values()) {
            if (code == value.getCode()) {
                return value;
            }
        }
        return DEFAULT;
    }

    @Override
    public String toString() {
        return getId();
    }
}
